Ranking Functions for Loops with Disjunctive Exit-Conditions

نویسندگان

  • Rody Kersten
  • Marko van Eekelen
چکیده

Finding ranking functions for the loops in a program is a prerequisite for proving its termination and analysing its resource usage. From its ranking function one easily derives a symbolic upper bound on the number of iterations of a loop. Such symbolic loop bounds can be used to derive concrete time and memory-usage bounds for complete programs. This paper builds upon an earlier paper in which a polynomial interpolation based ranking function inference method is introduced for loops with exit conditions that are expressions in propositional logic over arithmetical (in)equalities. We show that this earlier method is not applicable for certain loops: loops in which so-called condition jumping can occur. We define condition jumping and give an algorithm to detect it using symbolic execution and an SMT solver. We show how the earlier method can be adapted to be applicable also in the presence of condition jumping. As a result polynomial interpolation can be applied on a larger class of programs to infer polynomial ranking functions.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Program Analysis: Termination Proofs for Linear Simple Loops

Termination proof synthesis for simple loops, i.e., loops with only conjoined constraints in the loop guard and variable updates in the loop body, is the building block of termination analysis, as well as liveness analysis, for large complex imperative systems. In particular, we consider a subclass of simple loops which contain only linear constraints in the loop guard and linear updates in the...

متن کامل

Policy Iteration-Based Conditional Termination and Ranking Functions

Termination analyzers generally synthesize ranking functions or relations, which represent checkable proofs of their results. In [23], we proposed an approach for conditional termination analysis based on abstract fixpoint computation by policy iteration. This method is not based on ranking functions and does not directly provide a ranking relation, which makes the comparison with existing appr...

متن کامل

Handling Non-linear Operations in the Value Analysis of COSTA

Inferring precise relations between (the values of) program variables at different program points is essential for termination and resource usage analysis. In both cases, this information is used to synthesize ranking functions that imply the program’s termination and bound the number of iterations of its loops. For efficiency, it is common to base value analysis on non-disjunctive abstract dom...

متن کامل

Polyranking for Polynomial Loops

Although every terminating loop has a ranking function, not every loop has a ranking function of a restricted form, such as a lexicographic tuple of polynomials over program variables. We propose polyranking functions as a generalization of ranking functions for analyzing termination of loops. We define lexicographic polyranking functions in a general context and then specialize their synthesis...

متن کامل

On Multiphase-Linear Ranking Functions

Multiphase ranking functions (MΦRFs) were proposed as a means to prove the termination of a loop in which the computation progresses through a number of “phases”, and the progress of each phase is described by a different linear ranking function. Our work provides new insights regarding such functions for loops described by a conjunction of linear constraints (single-path loops). We provide a c...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2011